dd.color.extend({
    init:function(){},
    /**
     * Convert colours, hex[6] <-> rgb, hex[8] <-> rgba
     * @function
     *  @param hex {string} Ex: #F0F, #FF00FF, F0F, FF00FF
     *  @returns {string} hex ex: #FFFFFF
     * @function
     *  @param oct {string} Ex: #FFF, #FF00FFFF
     *  @returns {string} hex ex: #FFFFFF
     * @function
     *  @param oct {string} Ex: #FFF, #FF00FFFF
     *  @returns {string} hex ex: #FFFFFF
     */
    func:function(o1, o2, o3, o4)
    {
        // HEX
        if(dd.isString(o1))
        {
            if(o1.length == 7)
            {
                o1 = o1.substring(1, 7);
            }
            var hex = 'ffaadd';
            var rgb = parseInt(o1, 16); 
            
            return {
                red:(rgb >> 16) & 0xFF,
                green:(rgb >> 8) & 0xFF, 
                blue:rgb & 0xFF
            };
        }
        else if(dd.is(o4))
        {
            
        }
        else
        {
            return {
                red:(rgb >> 16) & 0xFF,
                green:(rgb >> 8) & 0xFF, 
                blue:rgb & 0xFF
            };
        }
    }
});